<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template name="lf2br">
 <xsl:param name="text"/>
 <xsl:choose>
   <xsl:when test="contains($text,'&#10;')">
     <xsl:value-of select="substring-before($text,'&#10;')"/>
     <br/>
     <xsl:call-template name="lf2br">
       <xsl:with-param name="text">
         <xsl:value-of select="substring-after($text,'&#10;')"/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:when>
   <xsl:otherwise>
     <xsl:value-of select="$text"/>
   </xsl:otherwise>
 </xsl:choose>
</xsl:template>


<xsl:template match="errors">

<table class="body" border="0" cellspacing="8" cellpadding="0" width="100%">
<tr>
<td class="title"><b>Si sono verificati degli errori!</b></td>
</tr>

<xsl:for-each select="error">
<tr>
<td><xsl:value-of select="@text"/></td>
</tr>
</xsl:for-each>

</table>
</xsl:template>

<xsl:template match="confirm">

<table class="body" border="0" cellspacing="8" cellpadding="0" width="100%">
<tr><td><span class="title">E' stata creata la seguente vacanza</span><p/></td></tr>
<tr><td>
<b><xsl:value-of select="@title"/></b><br/>
	  <xsl:call-template name="lf2br">
		<xsl:with-param name="text" select="@descr"/>
	  </xsl:call-template>
</td></tr>
<tr><td><center><img src="/imgs/dottedline.gif"/></center><br/>
Destinazione: <b><xsl:value-of select="@destination"/></b><br/>
Si parte da <b><xsl:value-of select="@city"/></b><br/>
Si parte il <b><xsl:value-of select="@startDate"/></b><br/>
Si torna il <b><xsl:value-of select="@endDate"/></b><br/>
</td></tr>
<tr height="20px"><td>Torna alle <a href="/holidays/myHolidays.aspx">tue vacanze</a> e rendila pubblica affinche' sia mostrata nel calendario delle vacanze!</td></tr>
</table>

</xsl:template>

<xsl:template match="zonfirm">

<table class="body" border="0" cellspacing="8" cellpadding="0" width="100%">
<tr><td><span class="title">E' stata modificata la seguente vacanza</span><p/></td></tr>
<tr><td>
<b><xsl:value-of select="@title"/></b><br/>
	  <xsl:call-template name="lf2br">
		<xsl:with-param name="text" select="@descr"/>
	  </xsl:call-template>
</td></tr>
<tr><td><center><img src="/imgs/dottedline.gif"/></center><br/>
Destinazione: <b><xsl:value-of select="@destination"/></b><br/>
Si parte da <b><xsl:value-of select="@city"/></b><br/>
Si parte il <b><xsl:value-of select="@startDate"/></b><br/>
Si torna il <b><xsl:value-of select="@endDate"/></b><br/>
</td></tr>
<tr height="20px"><td>Torna alle <a href="/holidays/myHolidays.aspx">tue vacanze</a> e rendila pubblica affinche' sia mostrata nel calendario delle vacanze!</td></tr>
</table>

</xsl:template>

</xsl:stylesheet>